<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:bmb="http://bmb.org" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/bmb:history">idForm;idQuestion;answerText;selectedAnswer
<xsl:for-each select="bmb:questions/bmb:question">
<xsl:for-each select="bmb:answers/bmb:answer">
<xsl:value-of select="/bmb:history/bmb:formId" />;<xsl:value-of select="../../@bmb:id" />;<xsl:value-of select="bmb:content" />;<xsl:choose><xsl:when test="bmb:selected='true'">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>